package com.skywaregroup.arenal;

import javax.ws.rs.*;
import javax.ws.rs.core.*;
import javax.ws.rs.core.Response.*;

public class ForbiddenException extends WebApplicationException
{
    private static final long serialVersionUID = 1L;

    public ForbiddenException()
    {
        this("You are not alowed to change given resource.", "Arenal");
    }

    public ForbiddenException(String message, String realm)
    {
        super(Response.status(Status.FORBIDDEN).header(HttpHeaders.WWW_AUTHENTICATE,
                                                          "Basic realm=\"" + realm + "\"")
                .entity(message).build());
    }
}

